﻿@model IEnumerable<Mvc.Models.UserProfile>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Register")
</p>
<table class="table">
    <tr>
        <th></th>
        <th></th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.UserName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Group.Nombre)
            </td>
            <td>

                @Ajax.ActionLink("Editar", "Edit", "Account", new { UserId = item.UserId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })

                @Ajax.ActionLink("Detalle", "Details", "Account", new { UserId = item.UserId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })
                @Ajax.ActionLink("Borrar", "Delete", "Account", new { UserId = item.UserId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })


            </td>
        </tr>
    }

</table>

